package advance.app.dao;

import advance.app.pojo.SopFileInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SopFileInfoMapper {

    int saveSopFileInfo(SopFileInfo info);

    SopFileInfo getLatestInfoByType(@Param("sopArea") String area,
                                    @Param("fileType") String fileType);

    SopFileInfo getLatestInfoByMid(Integer id);

    List<String> getAllVerInfoByType(@Param("sopArea") String area,
                                     @Param("fileType") String fileType);

    int updateSopFileInfo(SopFileInfo info);

    SopFileInfo getByTypeAndVer(@Param("sopArea") String area,
                                @Param("sopFileType") String fileType,
                                @Param("sopVersion") String version,
                                @Param("sopFileName") String fileName);

    int deleteByTypeAndVer(@Param("sopArea") String area,
                           @Param("sopFileType") String fileType,
                           @Param("sopVersion") String version,
                           @Param("sopFileName") String fileName);

    List<SopFileInfo> getByAreaAndTypeAndVer(@Param("sopArea") String area,
                                             @Param("sopFileType") String fileType,
                                             @Param("sopVersion") String version);

}
